//
//  ZMemberGroupModel.m
//  WeClubs
//
//  Created by 花花 on 2017/6/21.
//  Copyright © 2017年 Zed. All rights reserved.
//

#import "ZMemberGroupModel.h"
#import "ZStudentModel.h"
@implementation ZMemberGroupModel
- (instancetype)initWithDictionary:(NSDictionary *)dictionary{


    NSError *error;
    if (self = [super initWithDictionary:dictionary error:&error]) {
        
        self.group_name = dictionary[@"group_name"];
        NSMutableArray *temp =[NSMutableArray array];
        for (NSDictionary *dic in dictionary[@"students"]) {
            ZStudentModel *student = [[ZStudentModel alloc]initWithDictionary:dic];
            [temp addObject:student];
        }
        self.studentsArr = temp;
        if (error) {
            ZLog(@"Error: %@", error);
        }
    }
    return self;


}
@end
